The disclosure relates to a semiconductor device that transfers data between a plurality of bus masters and a plurality of bus slaves through a bus, and particularly to a technique for improving the operation efficiency of a semiconductor device in which the number of waits can be set for each device in accordance with an operating frequency.
In a semiconductor device such as a microcomputer, a plurality of bus masters and a plurality of bus slaves are coupled to a bus, and the bus masters and the bus slaves transfer signals through the bus. The bus masters are processors such as CPUs (Central Processing Units). The bus slaves are, for example, built-in memories. The CPUs as the bus masters access the built-in memories that are the bus slaves through the bus. The microcomputer independently supplies clocks to the bus masters and the bus slaves. The number of waits can be set for each bus slave such as a built-in memory, and each bus slave is operated in accordance with the set number of waits (see “Data Sheet (Ver2.0 (DM00077036)) of microcomputer STM32F437xx/439xx manufactured by STMicroelectronics”).
For example, it is assumed that the maximum frequency at which each bus slave can be operated is Fmax, and the maximum number of waits that can be set for each bus slave is Wmax. On the assumption that the operating frequency at which each bus slave is operated with W waits is an operating frequency F(W), each bus slave can be operated at the operating frequency F(W)=Fmax×(W+1)/(Wmax+1). For example, it is assumed that the maximum frequency Fmax at which each bus slave can be operated is 180 Mhz, and the settable maximum number of waits Wmax is 5. In this case, each bus slave can be operated at the frequency up to the operating frequency F(0)=30 Mhz in the case of 0 wait. Similarly, each bus slave can be operated at the frequency up to the operating frequency F(1)=60 Mhz in the case of 1 wait, at the frequency up to the operating frequency F(2)=90 Mhz in the case of 2 waits, at the frequency up to the operating frequency F(3)=120 Mhz in the case of 3 waits, at the frequency up to the operating frequency F(4)=150 Mhz in the case of 4 waits, and at the frequency up to the operating frequency F(5)=180 Mhz in the case of 5 waits.